package 第九章static;

public class ChineseStaticTest01 {
    public static void main(String[] args) {
        ChineseStatic c1 = new ChineseStatic("1", "张三");
        System.out.println(c1.id + c1.name + ChineseStatic.country);
        ChineseStatic c2 = new ChineseStatic("2", "张四");
        System.out.println(c2.id + c2.name + ChineseStatic.country);

        System.out.println(ChineseStatic.country);
        System.out.println(ChineseStatic.country);
        c1 = null;
        System.out.println(ChineseStatic.country);
        //此时访问country和对象张三已经没有关系，即使对象为null也不会出现异常
    }
}
